Opero Docs
API Operocompanies

Zleć przyrostową zmianę etykiet e-mail

POST
/v1/companies/{companyId}/email/messages/{messageId}/labels

Autoryzacja

api-token
AutoryzacjaBearer <token>

Token Opero API. Przekaż go jako Authorization: Bearer ek_...

In: header

Parametry ścieżki

companyId*tekst
messageId*tekst

Treść żądania

application/json

Definicje TypeScript

Użyj typu request body w TypeScript.

Treść odpowiedzi

application/json

application/json

curl -X POST "https://example.com/v1/companies/string/email/messages/string/labels" \  -H "Content-Type: application/json" \  -d '{    "add": [      "string"    ],    "remove": [      "string"    ],    "sourceOccurrenceId": "string",    "clientMutationId": "string",    "expectedVersion": 1  }'
{  "data": {    "id": "string",    "accountId": "string",    "messageId": "string",    "folderId": "string",    "sourceOccurrenceId": "string",    "kind": "FLAGS",    "revision": 0,    "status": "PENDING",    "desiredState": {},    "result": {},    "attempts": 0,    "lastError": "string",    "expectedAccountConfigRevision": 0,    "expectedFolderGeneration": "string",    "claimedAt": "2019-08-24T14:15:22Z",    "leaseUntil": "2019-08-24T14:15:22Z",    "nextAttemptAt": "2019-08-24T14:15:22Z",    "protocolStartedAt": "2019-08-24T14:15:22Z",    "retryAllowed": true,    "retryDisabledReason": "NOT_FAILED",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
{  "error": {    "code": "NOT_FOUND",    "message": "Resource not found",    "meta": {      "partiallyApplied": true,      "failedPhase": "defaultForms",      "committedObjects": [        {          "id": "5e2af9bc-be0b-4ad8-af57-e8319fb115d3",          "key": "session",          "created": true        }      ],      "fieldsWritten": 1,      "fieldsDeleted": 0    },    "fieldErrors": {      "name": [        "Field \"name\" is required"      ]    },    "unavailableMutationScopes": [      "contractor.bankAccounts"    ],    "clientMutationId": "019f2e3a-7c8b-7a33-9fc8-90db2b5b1e50",    "relationTableErrors": {},    "idempotencyConflict": {},    "errors": [      {        "message": "relation \"foo\" does not exist"      }    ],    "impacts": [      {}    ],    "validation": {}  }}