{
  "info": {
    "_postman_id": "apeiron-authentication___account",
    "name": "Apeiron API - Authentication & Account",
    "description": "JWT authentication, user profiles, customer management, and white-label sub-accounts.\n\nCollection Version: 1.0.0\nBase URL: https://api.apeiron.io/v2\nAuth: HTTP Basic (email + API token) or JWT Bearer token\nAPI Reference: https://api.apeiron.io/v2/",
    "version": "1.0.0",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "basic",
    "basic": [
      {
        "key": "username",
        "value": "{{username}}",
        "type": "string"
      },
      {
        "key": "password",
        "value": "{{api_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.apeiron.io",
      "type": "string"
    },
    {
      "key": "username",
      "value": "",
      "type": "string"
    },
    {
      "key": "api_token",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Customer",
      "description": "Customer endpoints",
      "item": [
        {
          "name": "List all customer profiles",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/customers",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers"
              ]
            },
            "description": "Returns information about all customers that the user is associated with."
          }
        },
        {
          "name": "Get customer profile",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/customers/{customer_number}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                "{customer_number}"
              ]
            },
            "description": "Returns information about a particular customer"
          }
        },
        {
          "name": "Create a child customer account",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/customers/P{parent_number}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "customers",
                "P{parent_number}"
              ]
            },
            "description": "Create a child customer account under parent account.",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "customer_name",
                  "description": "Company name of the child customer account",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "email",
                  "description": "Email address of the primary user of the child customer account",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "password",
                  "description": "Password of the primary user",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "first_name",
                  "description": "First name of the primary user",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "last_name",
                  "description": "Last name of the primary user",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "JWT",
      "description": "JWT endpoints",
      "item": [
        {
          "name": "Obtain JWT token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/auth/jwt/token",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "auth",
                "jwt",
                "token"
              ]
            },
            "description": "Obtain a JWT access and refresh tokens using account credentials. Access token validity is 5 minutes, while refresh token validity is 7 days. Please note that neither Basic nor JWT authentication are used for this endpoint. Only provide request body data.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"username\": \"username\",\n  \"password\": \"User password, not API token\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Refresh JWT token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/auth/jwt/refresh",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "auth",
                "jwt",
                "refresh"
              ]
            },
            "description": "Refresh JWT access and an existing refresh token. Access token validity is 5 minutes, while refresh token validity is 7 days. Please note that neither Basic nor JWT authentication are used for this endpoint. Only provide request body data.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"refresh\": \"refresh\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "User",
      "description": "User endpoints",
      "item": [
        {
          "name": "Get user profile",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/me",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me"
              ]
            },
            "description": "Returns information about the user that has authorized with the application."
          }
        },
        {
          "name": "List user phone numbers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/me/numbers?feature=&page_size=100",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "me",
                "numbers"
              ],
              "query": [
                {
                  "key": "feature",
                  "value": "",
                  "description": "Specify a feature to only return numbers which support that feature",
                  "disabled": true
                },
                {
                  "key": "page_size",
                  "value": "100",
                  "description": "Custom page size for pagination",
                  "disabled": true
                }
              ]
            },
            "description": "List all phone numbers that the user has permission for. Does not include numbers that do not have permissions assigned."
          }
        }
      ]
    },
    {
      "name": "White-Label",
      "description": "White-Label endpoints",
      "item": [
        {
          "name": "Create sub-account",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{base_url}}/whitelabel/child_customer",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "whitelabel",
                "child_customer"
              ]
            },
            "description": "Create a white-label sub-account",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "first_name",
                  "description": "Customer's first name",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "last_name",
                  "description": "Customer's last name",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "company_name",
                  "description": "Customer's company name",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "email",
                  "description": "Customer's email address",
                  "type": "text",
                  "value": ""
                },
                {
                  "key": "password",
                  "description": "Optional password to enable Apeiron Dashboard and JWT authentication",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Get new sub-account token",
          "request": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{base_url}}/whitelabel/child_customer",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "whitelabel",
                "child_customer"
              ]
            },
            "description": "Get a new token for a white-label sub-account",
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "customer_number",
                  "description": "Customer number",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          }
        },
        {
          "name": "Get whitelabel config for the current customer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/whitelabel/config",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "whitelabel",
                "config"
              ]
            },
            "description": "Returns information the whitelabel website or app for the current customer"
          }
        }
      ]
    }
  ]
}