---
agentTools:
  projectIndex: https://octopush-api.readme.io/llms.txt
---

# Optout contacts

## Encoding : UTF-8
## Authentication
Your "api-key" and "api-login" identifiers must be added in the headers.
## Definition
This web service allows you to optout a list of email addresses and/or phone numbers.
## Special parameters
| Name | Type | Description |
| -- | --| -- |
| phone_numbers | array | Array of phone numbers to optout. Maximum 200 phone numbers. |
| emails | array | Array of email addresses to optout. Maximum 200 email addresses. |
## Server Response Example in JSON
### Success
```
{
 "optout_numbers_count": 2,
 "optout_emails_count": 2
}
```
The counters only take into account the contacts that were really added to your optout list : already opted out
or invalid phone numbers are ignored.

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Octopush API",
    "description": "Octopush API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.octopush.com"
    }
  ],
  "paths": {
    "/v1/public/contact/optout": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Optout contacts",
        "description": "\n## Encoding : UTF-8\n## Authentication\nYour \"api-key\" and \"api-login\" identifiers must be added in the headers.\n## Definition\nThis web service allows you to optout a list of email addresses and/or phone numbers.\n## Special parameters\n| Name | Type | Description |\n| -- | --| -- |\n| phone_numbers | array | Array of phone numbers to optout. Maximum 200 phone numbers. |\n| emails | array | Array of email addresses to optout. Maximum 200 email addresses. |\n## Server Response Example in JSON\n### Success\n```\n{\n \"optout_numbers_count\": 2,\n \"optout_emails_count\": 2\n}\n```\nThe counters only take into account the contacts that were really added to your optout list : already opted out\nor invalid phone numbers are ignored.",
        "operationId": "post_public_api.contacts.optout",
        "parameters": [
          {
            "name": "api-login",
            "in": "header",
            "description": "Your api login from your account",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-key",
            "in": "header",
            "description": "Your api key from your account",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Payload to optout contact emails and/or phone numbers.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OptoutContactDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contacts opted out successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OptoutContactResponseDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad request."
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "OptoutContactDTO": {
        "properties": {
          "phone_numbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 200
          },
          "emails": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 200
          }
        },
        "type": "object"
      },
      "OptoutContactResponseDTO": {
        "properties": {
          "optout_numbers_count": {
            "type": "integer",
            "default": 0
          },
          "optout_emails_count": {
            "type": "integer",
            "default": 0
          }
        },
        "type": "object"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 104,
      "1": 185,
      "2": 114,
      "3": 51,
      "4": 89,
      "5": 65,
      "6": 148,
      "7": 50,
      "8": 58,
      "9": 175,
      "10": 65,
      "11": 24
    }
  }
}
````