Skip to main content
POST
/
v2
/
workspace
/
emailconfig
/
update
Update Email Config
curl --request POST \
  --url https://api.velt.dev/v2/workspace/emailconfig/update \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "useEmailService": true,
    "emailServiceConfig": {
      "type": "<string>",
      "apiKey": "<string>",
      "fromEmail": "<string>",
      "fromCompany": "<string>",
      "triggers": {
        "comment_annotation.add": true,
        "comment.add": true,
        "comment_annotation.status_change": true,
        "comment_annotation.assign": true,
        "comment_annotation.priority_change": true
      }
    }
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Email configuration updated successfully.",
    "data": null
  }
}
Use this API to update the email service configuration for a workspace. At least one of useEmailService or emailServiceConfig must be provided.
This endpoint uses API-key-level auth: pass x-velt-api-key and x-velt-auth-token as headers. You can obtain these from the Get Auth Tokens endpoint.

Endpoint

POST https://api.velt.dev/v2/workspace/emailconfig/update

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Request

{
  "data": {
    "useEmailService": true,
    "emailServiceConfig": {
      "type": "sendgrid",
      "apiKey": "SG.xxxxxxxxxx",
      "fromEmail": "noreply@example.com",
      "fromCompany": "Example Corp"
    }
  }
}

Example Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Email configuration updated successfully.",
    "data": null
  }
}

Failure Response

{
  "error": {
    "status": "INVALID_ARGUMENT",
    "message": "Invalid email service configuration."
  }
}
{
  "result": {
    "status": "success",
    "message": "Email configuration updated successfully.",
    "data": null
  }
}