Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create an announcement
cURL
curl --request POST \ --url https://admin.fanfare.io/api/announcements \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "content": "<string>", "experienceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "includeAudience": true, "includeWaitlist": true, "scheduledAt": "<string>", "timeZone": "<string>", "timingStrategy": "POINT_IN_TIME", "title": "<string>" } '
const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({ content: '<string>', experienceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', includeAudience: true, includeWaitlist: true, scheduledAt: '<string>', timeZone: '<string>', timingStrategy: 'POINT_IN_TIME', title: '<string>' }) }; fetch('https://admin.fanfare.io/api/announcements', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
import requests url = "https://admin.fanfare.io/api/announcements" payload = { "content": "<string>", "experienceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "includeAudience": True, "includeWaitlist": True, "scheduledAt": "<string>", "timeZone": "<string>", "timingStrategy": "POINT_IN_TIME", "title": "<string>" } headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text)
package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://admin.fanfare.io/api/announcements" payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"experienceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"includeAudience\": true,\n \"includeWaitlist\": true,\n \"scheduledAt\": \"<string>\",\n \"timeZone\": \"<string>\",\n \"timingStrategy\": \"POINT_IN_TIME\",\n \"title\": \"<string>\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
{ "archived": true, "content": "<string>", "createdAt": "2023-11-07T05:31:56Z", "createdBy": "<string>", "experienceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "includeAudience": true, "includeWaitlist": true, "isDefault": true, "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "timeZone": "<string>", "title": "<string>", "type": "EMAIL", "anchorEntity": "EXPERIENCE", "anchorMoment": "OPEN", "creativeDesignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "creativeDocument": { "body": {}, "editor": "<string>", "kind": "announcement-email", "schemaVersion": 2, "themeOverrides": { "background": "<string>", "danger": "<string>", "fontFamily": "<string>", "fontHeading": "<string>", "headerImageUrl": "<string>", "logoUrl": "<string>", "muted": "<string>", "primary": "<string>", "secondary": "<string>", "success": "<string>", "surface": "<string>", "text": "<string>", "variant": "default", "warning": "<string>" } }, "creativeTemplateKey": "<string>", "distributionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "distributionType": "QUEUE", "imageUrl": "<string>", "link": "<string>", "metadata": { "email": { "fromEmail": "[email protected]", "replyToEmail": "[email protected]", "fromName": "<string>", "replyToName": "<string>" } }, "offsetSeconds": 123, "scheduledAt": "2023-11-07T05:31:56Z", "sequenceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "shortContent": "<string>", "templateData": {}, "timingStrategy": "POINT_IN_TIME", "updatedAt": "2023-11-07T05:31:56Z", "updatedBy": "<string>" }
{ "error": "validation_error", "issues": [ { "expected": "<string>", "kind": "<string>", "message": "<string>", "path": [ { "input": "<unknown>", "key": "<string>", "origin": "<string>", "type": "<string>" } ], "received": "<string>", "type": "<string>" } ] }
{ "error": "<string>" }
Fanfare secret key. Keep secret credentials on your server.
EMAIL
SMS
DIRECT
FACEBOOK
X
INSTAGRAM
LINKEDIN
TIKTOK
YOUTUBE
Show child attributes
Announcement created successfully
1
EXPERIENCE
DISTRIBUTION
OPEN
CLOSE
SETTLE
QUEUE
DRAW
AUCTION
APPOINTMENT
TIMED_RELEASE
POINT_IN_TIME
RELATIVE