New customers
You can provision a user by specifying their email address and the API services to assign them
access permission:
$ curl -X POST 'https://api.agentfirst.dev/users' \
-H "Authorization: Bearer $AGENT_FIRST_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"services": ["search", "browser"]
}'
The user’s secret API token will be returned, along with the their normalized email address and
service permissions:
{
"email": "[email protected]",
"token": "a1-0dF6qKHYD7SNU5kAtjOmwHpH3iFgpylA",
"services": ["search", "browser"]
}
Here are the provisioning request keys and values:
| Key | Required | Value |
|---|
email | ✅ | The email address of the user to create an account for; the address is case insensitive and can be up to 255 characters, regardless of character encoding |
services | ✅ | An array of at least one of the API services to grant the account access to; the possible service values are search and browser |
Here are the response keys and values:
| Key | Value |
|---|
email | The email address of the new user account as recorded by the API |
token | The bearer token issued by the API for authentication |
services | An array of the API services that the account has been granted access to, search and browser being the possible values |
This endpoint is rate limited; if you receive a 429 response, pause for the backoff time given
by the Retry-After header before making another request.