Update a profile
const url = 'https://api.inboxcnx.com/v1/profiles/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"retentionDays":30,"maxMessagesPerMonth":null}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Example
{ "retentionDays": 30, "maxMessagesPerMonth": null}Responses
Section titled “Responses”The updated profile
object
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
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The credential lacks the write:application scope
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}No such profile
object
object
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
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}