{
  "service": "courier",
  "displayName": "Courier",
  "categories": [
    "Communication",
    "Marketing"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "COURIER_API_KEY",
      "description": "Courier API key used with the Authorization Bearer header. Create or manage keys in the Courier dashboard API Keys page: https://app.courier.com/settings/api-keys."
    }
  ],
  "homepageUrl": "https://www.courier.com",
  "actions": [
    {
      "id": "courier.add_list_subscribers",
      "service": "courier",
      "name": "add_list_subscribers",
      "description": "Add Courier recipients to a subscription list without replacing existing members.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list ID.",
            "pattern": "\\S"
          },
          "recipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "recipientId": {
                  "type": "string",
                  "minLength": 1,
                  "description": "The Courier recipient ID to subscribe.",
                  "pattern": "\\S"
                },
                "preferences": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The Courier recipient preferences object."
                }
              },
              "additionalProperties": false,
              "required": [
                "recipientId"
              ],
              "description": "One Courier list subscription to add without replacing existing subscriptions."
            },
            "description": "The Courier recipients to subscribe.",
            "minItems": 1
          }
        },
        "additionalProperties": false,
        "description": "The input payload for adding Courier list subscribers."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "description": "The Courier list ID used for the request."
          },
          "success": {
            "type": "boolean",
            "description": "Whether the subscription request completed successfully."
          },
          "statusCode": {
            "type": "integer",
            "description": "The HTTP status code returned by Courier."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after adding Courier list subscribers."
      }
    },
    {
      "id": "courier.delete_list",
      "service": "courier",
      "name": "delete_list",
      "description": "Delete a Courier subscription list by list ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for deleting a Courier subscription list."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "description": "The Courier list ID used for the request."
          },
          "success": {
            "type": "boolean",
            "description": "Whether the delete request completed successfully."
          },
          "statusCode": {
            "type": "integer",
            "description": "The HTTP status code returned by Courier."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after deleting a Courier subscription list."
      }
    },
    {
      "id": "courier.delete_profile",
      "service": "courier",
      "name": "delete_profile",
      "description": "Delete a Courier user profile by user ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier user ID associated with the profile.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for deleting a Courier profile."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The Courier user ID used for the request."
          },
          "success": {
            "type": "boolean",
            "description": "Whether the delete request completed successfully."
          },
          "statusCode": {
            "type": "integer",
            "description": "The HTTP status code returned by Courier."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after deleting a Courier profile."
      }
    },
    {
      "id": "courier.get_list",
      "service": "courier",
      "name": "get_list",
      "description": "Return a Courier subscription list by list ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list ID.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for reading a Courier subscription list."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "list": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The Courier list ID."
              },
              "name": {
                "type": "string",
                "description": "The Courier list name."
              },
              "created": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The timestamp when Courier reports the list was created."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "updated": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The timestamp when Courier reports the list was last updated."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "An object returned by the Courier API."
              }
            },
            "additionalProperties": false,
            "description": "A Courier subscription list."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Courier API response payload."
          }
        },
        "additionalProperties": false,
        "description": "The response returned for a Courier subscription list."
      }
    },
    {
      "id": "courier.get_profile",
      "service": "courier",
      "name": "get_profile",
      "description": "Return a Courier user profile and preferences by user ID.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier user ID associated with the profile.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for reading a Courier profile."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The Courier user ID used for the request."
          },
          "profile": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Courier profile object to merge into the user profile."
          },
          "preferences": {
            "anyOf": [
              {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The Courier recipient preferences object."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Courier API response payload."
          }
        },
        "additionalProperties": false,
        "description": "The response returned for a Courier user profile."
      }
    },
    {
      "id": "courier.list_list_subscriptions",
      "service": "courier",
      "name": "list_list_subscriptions",
      "description": "List subscriptions for a Courier subscription list.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list ID.",
            "pattern": "\\S"
          },
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier pagination cursor for the next page.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "listId"
        ],
        "description": "The input payload for listing Courier list subscriptions."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "description": "The Courier list ID used for the request."
          },
          "paging": {
            "type": "object",
            "properties": {
              "cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page when Courier returns one."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "more": {
                "type": "boolean",
                "description": "Whether Courier reports more records after this page."
              }
            },
            "additionalProperties": false,
            "description": "Courier pagination metadata."
          },
          "subscriptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "recipientId": {
                  "type": "string",
                  "description": "The subscribed Courier recipient ID."
                },
                "created": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The timestamp when Courier reports the subscription was created."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "preferences": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "The Courier recipient preferences object."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "An object returned by the Courier API."
                }
              },
              "additionalProperties": false,
              "description": "A Courier list subscription record."
            },
            "description": "The Courier list subscriptions returned for this page."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Courier API response payload."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Courier list subscriptions."
      }
    },
    {
      "id": "courier.list_lists",
      "service": "courier",
      "name": "list_lists",
      "description": "List Courier subscription lists with optional cursor and pattern filters.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier pagination cursor for the next page.",
            "pattern": "\\S"
          },
          "pattern": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list pattern filter.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for listing Courier subscription lists."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "paging": {
            "type": "object",
            "properties": {
              "cursor": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The cursor for the next page when Courier returns one."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "more": {
                "type": "boolean",
                "description": "Whether Courier reports more records after this page."
              }
            },
            "additionalProperties": false,
            "description": "Courier pagination metadata."
          },
          "lists": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The Courier list ID."
                },
                "name": {
                  "type": "string",
                  "description": "The Courier list name."
                },
                "created": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The timestamp when Courier reports the list was created."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "updated": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The timestamp when Courier reports the list was last updated."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "An object returned by the Courier API."
                }
              },
              "additionalProperties": false,
              "description": "A Courier subscription list."
            },
            "description": "The Courier subscription lists returned for this page."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Courier API response payload."
          }
        },
        "additionalProperties": false,
        "description": "The response returned when listing Courier subscription lists."
      }
    },
    {
      "id": "courier.merge_profile",
      "service": "courier",
      "name": "merge_profile",
      "description": "Merge values into a Courier user profile or create it when missing.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier user ID associated with the profile.",
            "pattern": "\\S"
          },
          "profile": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Courier profile object to merge into the user profile."
          }
        },
        "additionalProperties": false,
        "description": "The input payload for merging a Courier profile."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The Courier user ID used for the request."
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "description": "The Courier merge status when present."
              },
              {
                "type": "null"
              }
            ]
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Courier API response payload."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after merging a Courier profile."
      }
    },
    {
      "id": "courier.send_message",
      "service": "courier",
      "name": "send_message",
      "description": "Send a Courier message to one or more recipients.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Courier message object passed to POST /send."
          },
          "idempotencyKey": {
            "type": "string",
            "minLength": 1,
            "description": "The optional Courier Idempotency-Key header value used to deduplicate a logical send request.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "required": [
          "message"
        ],
        "description": "The input payload for sending a Courier message."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "requestId": {
            "description": "The Courier requestId value. Single-recipient sends return a string; multi-recipient sends may return a structured value."
          },
          "raw": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The raw Courier API response payload."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after sending a Courier message."
      }
    },
    {
      "id": "courier.unsubscribe_list_subscriber",
      "service": "courier",
      "name": "unsubscribe_list_subscriber",
      "description": "Unsubscribe one Courier user profile from a subscription list.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list ID.",
            "pattern": "\\S"
          },
          "userId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier user ID associated with the profile.",
            "pattern": "\\S"
          }
        },
        "additionalProperties": false,
        "description": "The input payload for unsubscribing a Courier list subscriber."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "description": "The Courier list ID used for the request."
          },
          "userId": {
            "type": "string",
            "description": "The Courier user ID used for the request."
          },
          "success": {
            "type": "boolean",
            "description": "Whether the unsubscribe request completed successfully."
          },
          "statusCode": {
            "type": "integer",
            "description": "The HTTP status code returned by Courier."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after unsubscribing a Courier list subscriber."
      }
    },
    {
      "id": "courier.upsert_list",
      "service": "courier",
      "name": "upsert_list",
      "description": "Create or replace a Courier subscription list.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier list ID.",
            "pattern": "\\S"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The Courier subscription list name.",
            "pattern": "\\S"
          },
          "preferences": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "The Courier recipient preferences object."
          }
        },
        "additionalProperties": false,
        "required": [
          "listId",
          "name"
        ],
        "description": "The input payload for creating or replacing a Courier subscription list."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "listId": {
            "type": "string",
            "description": "The Courier list ID used for the request."
          },
          "success": {
            "type": "boolean",
            "description": "Whether the upsert request completed successfully."
          },
          "statusCode": {
            "type": "integer",
            "description": "The HTTP status code returned by Courier."
          }
        },
        "additionalProperties": false,
        "description": "The response returned after upserting a Courier subscription list."
      }
    }
  ]
}
