---
title: "Register a Profile using Account Token (For Server to Server Integration)"
method: POST
path: "/api/v1/oauth/profile/register"
tags: ["Authentication"]
---

# Register a Profile using Account Token (For Server to Server Integration)

`POST /api/v1/oauth/profile/register`

## Request

- Base URL: `https://api.sahha.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sahha.ai/api/v1/oauth/profile/register`
- Auth: API key in header `Authorization`

Creates a new profile a returns a Profile token. A profile represents your end user. Requires a valid <b>Account</b> token in the authorization header.

## Request body

- RegisterProfileRequest
  - `externalId` string: ExternalId used to reference the created Profile

## Response `201`

Initialises a new profile and returns a Profile Token.

- ProfileTokenResponse
  - `profileToken` string: Profile token used in authorization header as 'profile {token}'
  - `expiresIn` integer: When the token expires, as Unix time in seconds.
  - `tokenType` string: The type of token being returned, will be 'account' or 'profile'
  - `refreshToken` string, nullable: Populated with a token value in response to a refresh token request.

## Other responses

- `400`: Returned if the provided external id is invalid or already in use.
- `401`: Returned if the authorization token is invalid.

---

[API](https://skmtc.dev/sahha/apis/sahha-platform-v1.md) - [All operations](https://skmtc.dev/sahha/apis/sahha-platform-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/sahha/apis/sahha-platform-v1/revisions/c7f918b46707?raw)
