Skip to content

Labels

5 endpoints

Email label and folder management

GET /accounts/{accountId}/labels

Get email labels/folders

Retrieve all labels (Gmail) or folders (Outlook) for a specific email account. Includes both user-created and system labels.

Parameters

accountId string

In path Required

Unique account identifier assigned by Riposte. You may also provide the custom user ID set during authentication; the API resolves it to the canonical account.

Additional parameters
includeSystem string

In query Optional

Set to `true` to include provider-managed system labels in the response.


                            false
                          

Returns

Collection of labels for an account.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X GET "http://localhost:8080/accounts/{accountId}/labels"
                  
              
Example response 200

              {
  "labels": [
    {
      "id": "lbl_support",
      "name": "support",
      "displayName": "Support Tickets"
    }
  ]
}
            

POST /accounts/{accountId}/labels

Create new label/folder

Create a new label (Gmail) or folder (Outlook) in the email account.

Parameters

id string

In path Required

Unique account identifier assigned by Riposte. You may also provide the custom user ID set during authentication; the API resolves it to the canonical account.


                        acct_123456789
                      

Request body

Required • application/json

Request body (application/json)

post-/accounts/{accountId}/labels-request-body-application/json

object<{ name, displayName, color }>
Field Type Description Values
color Optional string
displayName Required string
min length 1
name Required string
min length 1

Returns

Generic success wrapper for endpoints that simply confirm completion.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X POST "http://localhost:8080/accounts/{accountId}/labels" \
                  
                    
                      -H "Content-Type: application/json"
                  
              
Example response 200

              {
  "success": true,
  "message": "Account paused successfully."
}
            

DELETE /accounts/{accountId}/labels/{labelId}

Delete a label

Delete a label from an account

Parameters

accountId string

In path Required

Unique account identifier assigned by Riposte. You may also provide the custom user ID set during authentication; the API resolves it to the canonical account.

labelId string

In path Required

Returns

Generic success wrapper for endpoints that simply confirm completion.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X DELETE "http://localhost:8080/accounts/{accountId}/labels/{labelId}"
                  
              
Example response 200

              {
  "success": true,
  "message": "Account paused successfully."
}
            

POST /accounts/{accountId}/labels/cache/clear

Clear label cache for an account

Clear the cached labels for a specific account

Parameters

id string

In path Required

Unique account identifier assigned by Riposte. You may also provide the custom user ID set during authentication; the API resolves it to the canonical account.


                        acct_123456789
                      

Returns

Generic success wrapper for endpoints that simply confirm completion.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X POST "http://localhost:8080/accounts/{accountId}/labels/cache/clear"
                  
              
Example response 200

              {
  "success": true,
  "message": "Account paused successfully."
}
            

POST /accounts/{accountId}/labels/sync

Sync labels from email provider

Manually trigger synchronization of labels/folders from the email provider to update the local cache.

Parameters

id string

In path Required

Unique account identifier assigned by Riposte. You may also provide the custom user ID set during authentication; the API resolves it to the canonical account.


                        acct_123456789
                      

Returns

Generic success wrapper for endpoints that simply confirm completion.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X POST "http://localhost:8080/accounts/{accountId}/labels/sync"
                  
              
Example response 200

              {
  "success": true,
  "message": "Account paused successfully."
}