Skip to content

Accounts

4 endpoints

Email account management and connection

GET /accounts

List accounts

Get a paginated list of all connected email accounts

Parameters

page string

In query Optional

1-indexed page number to return when using offset pagination.


                        1
                      
limit string

In query Optional

Maximum number of items to include per page.


                        50
                      
Additional parameters
pageToken string

In query Optional

Opaque token returned from a previous request for page-based pagination.


                            WyJjdXJzb3IiLCIxMjM0Il0=
                          
cursor string

In query Optional

Cursor identifier returned from a previous response when using cursor-based pagination.


                            cursor_2024-02-15T10:00:00Z
                          

Returns

Paginated list of accounts returned by list endpoints.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X GET "http://localhost:8080/accounts"
                  
              
Example response 200

              {
  "accounts": [
    {
      "id": "acct_123456789",
      "email": "[email protected]",
      "provider": "gmail",
      "paused": false,
      "createdAt": "2024-05-01T12:00:00.000Z",
      "updatedAt": "2024-05-10T09:30:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 1,
    "totalPages": 1,
    "hasNext": false,
    "hasPrev": false
  }
}
            

DELETE /accounts/{accountId}

Delete an account and all related data

Permanently delete an email account and all associated data

Parameters

accountId string

In path Required

Unique account identifier assigned by Riposte.


                        acct_123456789
                      

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}"
                  
              
Example response 200

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

GET /accounts/{accountId}

Get account details

Get detailed information about a specific email account

Parameters

accountId string

In path Required

Unique account identifier assigned by Riposte.


                        acct_123456789
                      

Returns

Canonical representation of a Riposte-managed account.

Content type: application/json

Status: 200

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

              {
  "id": "acct_123456789",
  "email": "[email protected]",
  "provider": "gmail",
  "paused": false,
  "createdAt": "2024-05-01T12:00:00.000Z",
  "updatedAt": "2024-05-10T09:30:00.000Z",
  "gmailAuthToken": {
    "id": "tok_01HZY90X8Z64Q9T6Y1F9AZ1B9Q",
    "scope": "https://www.googleapis.com/auth/gmail.modify",
    "expiryDate": "2024-05-10T10:30:00.000Z",
    "customUserId": "user_123",
    "createdAt": "2024-05-01T12:00:00.000Z",
    "updatedAt": "2024-05-08T07:15:45.000Z"
  }
}
            

POST /accounts/{accountId}/pause

Pause or resume account

Pause or resume email synchronization for a specific account

Parameters

accountId string

In path Required

Unique account identifier assigned by Riposte.


                        acct_123456789
                      

Request body

Required • application/json

Request payload used to pause or resume an account without revoking authentication.

Request body (application/json)

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

object<{ paused }>

Request payload used to pause or resume an account without revoking authentication.

Field Type Description Values
paused Required boolean Set to `true` to stop all syncing and deliveries for the account or `false` to resume.
Example true

Returns

Confirmation payload returned after pausing or resuming an account.

Content type: application/json

Status: 200

Example request
                
                    
                    curl -X POST "http://localhost:8080/accounts/{accountId}/pause" \
                  
                    
                      -H "Content-Type: application/json" \
                  
                    
                      --data @- <<'BODY'
                  
                    
                    {
                  
                    
                      "paused": true
                  
                    
                    }
                  
                    
                    BODY
                  
              
Example response 200

              {
  "accountId": "acct_123456789",
  "paused": true
}
            

Note: Every account-scoped endpoint accepts either the canonical Riposte account ID (acct_…) or the custom user ID you supplied during authentication. The API automatically resolves custom IDs to the underlying account so routes like /accounts/some-custom-id/messages work without any additional configuration.