Skip to content

Create a profile

POST
/v1/profiles
curl --request POST \
--url https://api.inboxcnx.com/v1/profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "key": "pro", "retentionDays": 90, "deletedRetentionDays": 7, "maxMessagesPerMonth": 10000, "maxStoredBytesPerMonth": 5368709120 }'

Creates a profile, a price package of the application that sets how long mail is stored and how much a grant may receive per month. The key is the name your code uses to assign grants to it.

Requires the write:application scope.

Media typeapplication/json
object
key
required
string
/^[a-z0-9][a-z0-9_-]{0,31}$/
retentionDays
integer
<= 36500
deletedRetentionDays
integer | null
<= 36500
maxMessagesPerMonth
integer | null
> 0 <= 2147483647
maxStoredBytesPerMonth
integer | null
> 0 <= 9007199254740991
isDefault
boolean

Example

{
"key": "pro",
"retentionDays": 90,
"deletedRetentionDays": 7,
"maxMessagesPerMonth": 10000,
"maxStoredBytesPerMonth": 5368709120
}

The created profile

Media typeapplication/json
object
key
required
string
/^[a-z0-9][a-z0-9_-]{0,31}$/
retentionDays
required
integer
<= 36500
deletedRetentionDays
required
integer | null
<= 36500
maxMessagesPerMonth
required
integer | null
> 0 <= 2147483647
maxStoredBytesPerMonth
required
integer | null
> 0 <= 9007199254740991
isDefault
required
boolean
archivedAt
required
string | null
grantCount
required
integer
createdAt
required
string
updatedAt
required
string

Example

{
"key": "pro",
"retentionDays": 90,
"deletedRetentionDays": 7,
"maxMessagesPerMonth": 10000,
"maxStoredBytesPerMonth": 5368709120,
"isDefault": false,
"archivedAt": null,
"grantCount": 12,
"createdAt": "2026-10-01T10:00:00.000Z",
"updatedAt": "2026-10-01T10:00:00.000Z"
}

Invalid body

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The credential lacks the write:application scope

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The key is taken

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}