We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).
By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
Learn more on our terms of service and privacy policy.
Generated from AskNews API 0.24.95.
asknews api newsletters delete-newsletterDelete a newsletter.
DELETE /v1/chat/newsletters/{newsletter_id}delete_newslettermutatingOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
This operation requires confirmation and --yes in non-interactive use.
asknews api newsletters delete-newsletter-contactDelete a newsletter contact.
DELETE /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}delete_newsletter_contactmutatingOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
--contact-id | The contact ID Location: path. Type: string. Required. |
This operation requires confirmation and --yes in non-interactive use.
asknews api newsletters get-newsletterGet a newsletter.
GET /v1/chat/newsletters/{newsletter_id}get_newsletterread-onlyOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
asknews api newsletters get-newsletter-contactGet a newsletter contact.
GET /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}get_newsletter_contactread-onlyOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
--contact-id | The contact ID Location: path. Type: string. Required. |
asknews api newsletters get-newsletter-contactsGet newsletter contacts.
GET /v1/chat/newsletters/{newsletter_id}/contactsget_newsletter_contactsread-onlyOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
asknews api newsletters get-newslettersGet all created newsletters.
GET /v1/chat/newslettersget_newslettersread-onlyasknews api newsletters get-public-newslettersGet all public newsletters.
GET /v1/chat/newsletters/publicget_public_newslettersread-onlyOptions:
| Option | Description |
|---|---|
--page | The page number to get Location: query. Type: integer. Optional. Default: 1. |
--per-page | The number of items per page Location: query. Type: integer. Optional. Default: 10. |
--all | Whether to get all the public newsletters Location: query. Type: boolean. Optional. Default: false. |
asknews api newsletters patch-newsletter-contactUpdate a newsletter contact.
PATCH /v1/chat/newsletters/{newsletter_id}/contacts/{contact_id}patch_newsletter_contactmutatingOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
--contact-id | The contact ID Location: path. Type: string. Required. |
Request body fields:
| Option | Type | Required | Description |
|---|---|---|---|
--email | string | yes | |
--first-name | string or null | no | |
--last-name | string or null | no | |
--unsubscribed | boolean | no | Default: false. |
Use direct kebab-case body options, --body '{...}', or --body @request.json.
Direct body options override values supplied through --body.
This operation requires confirmation and --yes in non-interactive use.
asknews api newsletters post-newsletterCreate a newsletter.
POST /v1/chat/newsletterspost_newslettermutatingRequest body fields:
| Option | Type | Required | Description |
|---|---|---|---|
--name | string | yes | The name of the newsletter. |
--query | string | yes | The natural language query to run for the newsletter. |
--cron | string | yes | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples |
--model | string | yes | The model to use for the newsletter. Choices: gpt-4o, gpt-4o-mini, claude-3-5-sonnet-latest, meta-llama/Meta-Llama-3.1-405B-Instruct, meta-llama/Meta-Llama-3.3-70B-Instruct. |
--subject | string or null | no | The subject of the newsletter. If not provided it will be auto generated. |
--sender | string | yes | The sender of the newsletter. |
--logo-url | string or null | no | The logo URL for the newsletter. |
--reply-to | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. |
--audience-id | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. |
--resend-api-key | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. |
--public | boolean | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. Default: true. |
--active | boolean | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. Default: true. |
--expires-at | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. |
Use direct kebab-case body options, --body '{...}', or --body @request.json.
Direct body options override values supplied through --body.
This operation requires confirmation and --yes in non-interactive use.
asknews api newsletters post-newsletter-contactsCreate a newsletter contact.
POST /v1/chat/newsletters/{newsletter_id}/contactspost_newsletter_contactsmutatingOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
Request body fields:
| Option | Type | Required | Description |
|---|---|---|---|
--email | string | yes | |
--first-name | string or null | no | |
--last-name | string or null | no | |
--unsubscribed | boolean | no | Default: false. |
Use direct kebab-case body options, --body '{...}', or --body @request.json.
Direct body options override values supplied through --body.
This operation requires confirmation and --yes in non-interactive use.
asknews api newsletters put-newsletterUpdate a newsletter.
PUT /v1/chat/newsletters/{newsletter_id}put_newslettermutatingOptions:
| Option | Description |
|---|---|
--newsletter-id | The newsletter ID Location: path. Type: string. Required. Format: uuid. |
Request body fields:
| Option | Type | Required | Description |
|---|---|---|---|
--name | string or null | no | The name of the newsletter. |
--query | string or null | no | The natural language query to run for the newsletter. |
--cron | string or null | no | The cron schedule for the newsletter. For example daily at 00:00 UTC is '0 0 * * *'. See https://crontab.run/ for more examples |
--model | string or null | no | The model to use for the newsletter. |
--subject | string or null | no | The subject of the newsletter. If not provided it will be auto generated. |
--sender | string or null | no | The sender of the newsletter. |
--logo-url | string or null | no | The logo URL for the newsletter. |
--reply-to | string or null | no | The reply-to address for the newsletter. If not provided, the sender will be used. |
--audience-id | string or null | no | The audience ID to use for the newsletter. If not provided a new audience will be created. |
--resend-api-key | string or null | no | The resend API key to use for the newsletter. If not provided, the newsletter will not be sent. |
--public | boolean or null | no | Whether the newsletter is public or not. If not provided, the newsletter will be public. If you make the newsletter public only title and query will be shown. |
--active | boolean or null | no | Whether the newsletter is active or not. If not provided, the newsletter will be active. If you make the newsletter inactive, it will not be sent. |
--expires-at | string or null | no | The expiration date for the alert. Default is None. If set, the alert will be disabled after this date. |
Use direct kebab-case body options, --body '{...}', or --body @request.json.
Direct body options override values supplied through --body.
This operation requires confirmation and --yes in non-interactive use.
All commands support --output human|table|json|jsonl|yaml, --json, API/auth URL
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
are written to stderr.