API ReferenceapimessagingPOST /v1/messaging/campaigns/{id}/schedule

POST /v1/messaging/campaigns/\{id\}/schedule

Service: messaging · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • id (string) required

Request body

{
  "type": "object",
  "properties": {
    "scheduled_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "scheduled_at"
  ]
}

Responses

200 Scheduled

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "segment_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "scheduled",
        "sending",
        "sent",
        "cancelled"
      ]
    },
    "scheduled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "sent_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_by": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "brand_id",
    "name",
    "description",
    "segment_id",
    "status",
    "scheduled_at",
    "published_at",
    "sent_at",
    "cancelled_at",
    "created_by",
    "created_at",
    "updated_at"
  ]
}

404 Not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "error",
    "message"
  ]
}

412 Bad state

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "error",
    "message"
  ]
}

500 Server error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "details": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://messaging.platform.loop.health/v1/messaging/campaigns/{id}/schedule \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'