Getting started

Simple tutorial to get started with the client account API

Build the base URL

Use your platform_id to build up the base URL for all available REST API endpoints. See Base URL for more information.

For example, if your platform_id is my_company_platform_id, then the base URL for the REST API endpoints in your staging environment is https://api.staging.my_company_platform_id.platform.io.

Fetch API token

Before calling the client account API endpoints, fetch an API token with your service user using the Authentication API endpoint.

For example, if your service user for your staging environment has the following login details:

  • username: service_user
  • password: xxxyyy

, then the call looks as follows:

curl POST https://api.staging.my_company_platform_id.platform.io/v1/login/password \
--data '{
    "username": "service_user",
    "password": "xxxyyy"
}'

, with a success response as follows:

{
    "api_token": "your_api_token"
}

Create a client account

Use the newly created API token as a bearer token in the header for each call to the client account API endpoints. For example, when you create a new client account. See Create client account for more information.

Example call:

curl POST https://api.staging.my_company_platform_id.platform.io/v1/client/signup \
--header 'Authorization: Bearer your_api_token' \
--data '{
    "user_id": "80491f93-1eb1-42c2-b5e1-d2e94dac5ab9",
    "email": "new_client@client.com",
    "name": {
        "first_name": "new",
        "last_name": "client"
    },
    "password": "new_client"
}'

Response:

{
    "client_token": "client_token"
}