---
title: "POST /trigger/agent-space/{agentSpaceId}/triggers"
method: POST
path: "/trigger/agent-space/{agentSpaceId}/triggers"
---

# POST /trigger/agent-space/{agentSpaceId}/triggers

`POST /trigger/agent-space/{agentSpaceId}/triggers`

Creates a new Trigger in the specified agent space

## Path parameters

- `agentSpaceId` string, required — Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)

## Request body

- object
  - `type` string, required — How a Trigger is fired
  - `condition` object, required — Defines the firing condition for a Trigger
    - `schedule` object — Time-based firing condition
      - `expression` string, required — The schedule expression
  - `action` object, required — Action a Trigger performs when it fires
  - `status` string — The status of a Trigger
  - `clientToken` string — A unique, case-sensitive identifier used for idempotent Trigger creation

## Response `201`

Success

- CreateTriggerResponse — Response structure for creating a new Trigger
  - `trigger` object, required — The Trigger object
    - `triggerId` string, required — The unique identifier for this Trigger
    - `agentSpaceId` string, required — The agent space this Trigger belongs to
    - `type` string, required — How this Trigger fires
    - `condition` object, required — The condition that fires this Trigger
      - `schedule` object — Time-based firing condition
        - `expression` string, required — The schedule expression
    - `action` object, required — The action this Trigger performs when it fires
    - `status` string, required — The status of this Trigger
    - `createdAt` string, date-time, required — Timestamp when this Trigger was created
    - `updatedAt` string, date-time, required — Timestamp when this Trigger was last updated

## Other responses

- `480` — ValidationException
- `481` — ContentSizeExceededException
- `482` — ServiceQuotaExceededException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — AccessDeniedException
- `486` — ResourceNotFoundException
- `487` — ThrottlingException
- `488` — InvalidParameterException

---

[API](https://skmtc.net/aws/apis/devops-agent.md) · [All operations](https://skmtc.net/aws/apis/devops-agent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/devops-agent/versions/ca2af02d3853/schema)
