Create a profile
POST
/v1/profiles
const url = 'https://api.inboxcnx.com/v1/profiles';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"key":"pro","retentionDays":90,"deletedRetentionDays":7,"maxMessagesPerMonth":10000,"maxStoredBytesPerMonth":5368709120}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
key
required
string
retentionDays
integer
deletedRetentionDays
integer | null
maxMessagesPerMonth
integer | null
maxStoredBytesPerMonth
integer | null
isDefault
boolean
Example
{ "key": "pro", "retentionDays": 90, "deletedRetentionDays": 7, "maxMessagesPerMonth": 10000, "maxStoredBytesPerMonth": 5368709120}Responses
Section titled “Responses”The created profile
Media typeapplication/json
object
key
required
string
retentionDays
required
integer
deletedRetentionDays
required
integer | null
maxMessagesPerMonth
required
integer | null
maxStoredBytesPerMonth
required
integer | null
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" }}