Operations

Get an asynchronous operation

Returns one asynchronous operation from the active organization. Use this endpoint to get an asynchronous operation through the Samva email API.

GET
/v1/operations/{id}

Returns one asynchronous operation from the active organization.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^op_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

Operation

application/json
  1. response
id*OperationId
Match^op_[0-9a-hjkmnp-tv-z]{16,24}$
organizationId*string
kind*string
Value in"email-domain-provisioning""organization-deletion"
subject*
actor*
status*string
Value in"pending""running""succeeded""failed"
phase*string
Value in"accepted""dispatching""provisioning""deleting""finalizing""completed"
error*|null
createdAt*string
updatedAt*string
startedAt*string|null
completedAt*string|null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.operations.get({  "id": "example"});
Example Response
{  "id": "string",  "organizationId": "string",  "kind": "email-domain-provisioning",  "subject": {    "type": "string",    "id": "string"  },  "actor": {    "type": "user",    "id": "string"  },  "status": "pending",  "phase": "accepted",  "error": {    "code": "validation-failed",    "message": "string"  },  "createdAt": "string",  "updatedAt": "string",  "startedAt": "string",  "completedAt": "string"}

Related documentation