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

# Subaccount information

## Encoding : UTF-8
## Authentication
Your "api-key" and "api-login" identifiers must be added in the headers.
## Definition
This web service allows you to retrieve information from a sub-account.
## Path parameters
| Name | Type | Description |
| -- | --| -- |
| email | string | This value is email to be associated with the sub-account. |
## How Our API Deals With Incorrect Data
The API we provide will try to interpret your request as best it can. If a parameter has the wrong value, we will try to understand it anyway. If the parameter has the wrong type, we will try to format it as best we can. Thus, we have determined default values, which are indicated in our documentation. If a parameter could not be recognized or "fixed", we will ignore it, but your request will be sent.
If one of your parameters does not have the right value, or does not have the right type, we will try to:
- "cast" (convert) it so that it can be understood.
- format it (delete prohibited characters for example)
## Server Response Example in JSON
### Success
```
{
   "first_name": "Leonardo",
   "last_name": "Da Vinci",
   "company_name": "Italy",
   "credit": 10,
   "api_key": "**********",
   "callbacks": {
     "callback_url_for_inbounds": "https://dns.com/call-back-url-1",
     "callback_url_for_deliveries": "https://dns.com/call-back-url-2",
     "callback_url_for_blacklisted_numbers": "https://dns.com/call-back-url-3",
     "callback_url_for_visits": "https://dns.com/call-back-url-4",
     "email_for_inbounds": "some_user_0@email.org",
     "api_version": "1.0",
     "use_metadata_node_for_inbound": null
  }
}
```

# 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/subaccount/{email}": {
      "get": {
        "tags": [
          "Subaccounts"
        ],
        "summary": "Subaccount information",
        "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 retrieve information from a sub-account.\n## Path parameters\n| Name | Type | Description |\n| -- | --| -- |\n| email | string | This value is email to be associated with the sub-account. |\n## How Our API Deals With Incorrect Data\nThe API we provide will try to interpret your request as best it can. If a parameter has the wrong value, we will try to understand it anyway. If the parameter has the wrong type, we will try to format it as best we can. Thus, we have determined default values, which are indicated in our documentation. If a parameter could not be recognized or \"fixed\", we will ignore it, but your request will be sent.\nIf one of your parameters does not have the right value, or does not have the right type, we will try to:\n- \"cast\" (convert) it so that it can be understood.\n- format it (delete prohibited characters for example)\n## Server Response Example in JSON\n### Success\n```\n{\n   \"first_name\": \"Leonardo\",\n   \"last_name\": \"Da Vinci\",\n   \"company_name\": \"Italy\",\n   \"credit\": 10,\n   \"api_key\": \"**********\",\n   \"callbacks\": {\n     \"callback_url_for_inbounds\": \"https://dns.com/call-back-url-1\",\n     \"callback_url_for_deliveries\": \"https://dns.com/call-back-url-2\",\n     \"callback_url_for_blacklisted_numbers\": \"https://dns.com/call-back-url-3\",\n     \"callback_url_for_visits\": \"https://dns.com/call-back-url-4\",\n     \"email_for_inbounds\": \"some_user_0@email.org\",\n     \"api_version\": \"1.0\",\n     \"use_metadata_node_for_inbound\": null\n  }\n}\n```",
        "operationId": "get_public_api.sub_account.get",
        "parameters": [
          {
            "name": "email",
            "in": "path",
            "description": "This value is email to be associated with the sub-account.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "email",
              "pattern": ".+\\@.+\\..+"
            }
          },
          {
            "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"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get sub account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubAccountResponseData"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden to view."
          },
          "404": {
            "description": "Not found."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UrlCallbacksDTO": {
        "properties": {
          "callback_url_for_inbounds": {
            "type": "string"
          },
          "callback_url_for_deliveries": {
            "type": "string"
          },
          "callback_url_for_blacklisted_numbers": {
            "type": "string"
          },
          "callback_url_for_visits": {
            "type": "string"
          },
          "email_for_inbounds": {
            "type": "string"
          },
          "api_version": {
            "type": "string"
          },
          "use_metadata_node_for_inbound": {
            "type": "boolean",
            "default": true
          }
        },
        "type": "object"
      },
      "SubAccountResponseData": {
        "properties": {
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "company_name": {
            "type": "string"
          },
          "api_key": {
            "type": "string"
          },
          "credit": {
            "type": "number",
            "format": "float"
          },
          "callbacks": {
            "$ref": "#/components/schemas/UrlCallbacksDTO"
          }
        },
        "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
    }
  }
}
````