Skip to content

Update a profile

PATCH
/v1/profiles/{key}
curl --request PATCH \
--url https://api.inboxcnx.com/v1/profiles/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "retentionDays": 30, "maxMessagesPerMonth": null }'

Changes a profile’s retention or monthly limits, archives it, or makes it the default for new grants. Lowering retentionDays or deletedRetentionDays deletes the stored mail of every grant on the profile past the new value, once a 7-day hold has passed: raising it again within the hold deletes nothing. retentionDays can rise only up to the retention every grant on the profile consented to. The monthly limits can change at any time and apply to each grant separately. The default profile cannot be archived.

Requires the write:application scope.

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

Example

{
"retentionDays": 30,
"maxMessagesPerMonth": null
}

The updated 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"
}
}

No such profile

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

Example generated

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

The retention exceeds a grant’s consent, the default cannot be archived, or an archived profile cannot become the default

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

Example generated

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