Update the application
PATCH
/v1/application
const url = 'https://api.inboxcnx.com/v1/application';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"subscribedRoles":["inbox","sent"],"returnUrls":["https://app.example.com/inbox/connected"]}'};
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/application \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "subscribedRoles": [ "inbox", "sent" ], "returnUrls": [ "https://app.example.com/inbox/connected" ] }'Changes the caller application’s folder filter, the return URLs of the connect flow, or pauses processing for all its grants. A changed folder filter applies to new mail only and backfills nothing. While paused, mail that arrives is skipped, not queued.
Requires the write:application scope.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
subscribedRoles
Array<string>
paused
boolean
returnUrls
Replaces the URLs POST /v1/connections/initiate accepts as returnUrl. Each must use https (http only on localhost) and carry no query or fragment; at most 10.
Array<string>
Example
{ "subscribedRoles": [ "inbox", "sent" ], "returnUrls": [ "https://app.example.com/inbox/connected" ]}Responses
Section titled “Responses”The updated application
Media typeapplication/json
object
id
required
string
name
required
string
mode
required
string
defaultRetentionDays
required
number
subscribedRoles
required
Array<string>
returnUrls
required
Array<string>
createdAt
required
string
updatedAt
required
string
terminatedAt
required
string | null
paused
required
boolean
blocked
required
boolean
Example
{ "mode": "direct"}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 caller’s application no longer exists
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}The application is terminated
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example" }}