> For the complete documentation index, see [llms.txt](https://api.bind.hr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.bind.hr/messaging-api/template.md).

# Template

## List

> Returns client-specific templates (optionally filtered by status) plus common approved templates.<br>

```json
{"openapi":"3.0.3","info":{"title":"SMS Template API","version":"1.0.0"},"servers":[{"url":"https://messaging-api.bind.hr","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key header."}},"schemas":{}},"paths":{"/v1.0/sms/template":{"get":{"tags":["Template"],"summary":"List","description":"Returns client-specific templates (optionally filtered by status) plus common approved templates.\n","parameters":[{"in":"query","name":"status","schema":{"type":"string"},"required":false,"description":"Optional status filter (e.g. `approved`, `for_review`)."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse"}}}},"401":{"description":"Unauthorized (missing/invalid API key)"},"500":{"description":"Internal server error"}}}}}}
```

## Create

> Create a new template.

```json
{"openapi":"3.0.3","info":{"title":"SMS Template API","version":"1.0.0"},"servers":[{"url":"https://messaging-api.bind.hr","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key header."}},"schemas":{"SubmitRequest":{"type":"object","properties":{"name":{"type":"string"},"sender":{"type":"string","minLength":3,"maxLength":15},"content":{"type":"string","maxLength":1000}},"required":["name","sender","content"]},"SubmitResponse":{"type":"object","properties":{"success":{"type":"boolean"},"item":{"$ref":"#/components/schemas/TemplateBase"}},"required":["success","item"]},"TemplateBase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sender":{"type":"string","description":"Sender ID. Numeric 4-15 digits or alphanumeric up to 11 chars (A-Z a-z 0-9 _ space)."},"content":{"type":"string"},"status":{"type":"string","description":"Template status (e.g., for_review, approved)."}},"required":["id","name","sender","content","status"]},"OperationError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}},"required":["success","error"]}}},"paths":{"/v1.0/sms/template":{"post":{"tags":["Template"],"summary":"Create","description":"Create a new template.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"200":{"description":"Created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationError"}}}},"401":{"description":"Unauthorized (missing/invalid API key)"},"500":{"description":"Failed to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationError"}}}}}}}}}
```

## Update

> Update an existing template.

```json
{"openapi":"3.0.3","info":{"title":"SMS Template API","version":"1.0.0"},"servers":[{"url":"https://messaging-api.bind.hr","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key header."}},"schemas":{"SubmitRequest":{"type":"object","properties":{"name":{"type":"string"},"sender":{"type":"string","minLength":3,"maxLength":15},"content":{"type":"string","maxLength":1000}},"required":["name","sender","content"]},"SubmitResponse":{"type":"object","properties":{"success":{"type":"boolean"},"item":{"$ref":"#/components/schemas/TemplateBase"}},"required":["success","item"]},"TemplateBase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sender":{"type":"string","description":"Sender ID. Numeric 4-15 digits or alphanumeric up to 11 chars (A-Z a-z 0-9 _ space)."},"content":{"type":"string"},"status":{"type":"string","description":"Template status (e.g., for_review, approved)."}},"required":["id","name","sender","content","status"]},"OperationError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"}},"required":["success","error"]}}},"paths":{"/v1.0/sms/template/{id}":{"put":{"tags":["Template"],"summary":"Update","description":"Update an existing template.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Template id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"200":{"description":"Updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationError"}}}},"401":{"description":"Unauthorized (missing/invalid API key)"},"404":{"description":"Template not found"},"500":{"description":"Failed to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationError"}}}}}}}}}
```

## DELETE /v1.0/sms/template/{id}

> Delete

```json
{"openapi":"3.0.3","info":{"title":"SMS Template API","version":"1.0.0"},"servers":[{"url":"https://messaging-api.bind.hr","description":"Production"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY","description":"API key header."}},"schemas":{"DeleteResponse":{"type":"object","properties":{"success":{"type":"boolean"},"item":{"$ref":"#/components/schemas/TemplateBase"}},"required":["success","item"]},"TemplateBase":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sender":{"type":"string","description":"Sender ID. Numeric 4-15 digits or alphanumeric up to 11 chars (A-Z a-z 0-9 _ space)."},"content":{"type":"string"},"status":{"type":"string","description":"Template status (e.g., for_review, approved)."}},"required":["id","name","sender","content","status"]}}},"paths":{"/v1.0/sms/template/{id}":{"delete":{"tags":["Template"],"summary":"Delete","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Template id"}],"responses":{"200":{"description":"Deleted (soft) successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"description":"Unauthorized (missing/invalid API key)"},"404":{"description":"Template not found / already deleted"},"500":{"description":"Failed to delete"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://api.bind.hr/messaging-api/template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
