|
387 | 387 | "items": { |
388 | 388 | "type": "object", |
389 | 389 | "description": "Information about the groups that received the broadcast.", |
390 | | - "properties": { |
391 | | - "id": { |
392 | | - |
393 | | - } |
394 | | - } |
| 390 | + "example": [ |
| 391 | + "Group 1", |
| 392 | + "Group 2" |
| 393 | + ] |
395 | 394 | } |
| 395 | + }, |
| 396 | + "text": { |
| 397 | + "type": "string", |
| 398 | + "description": "The text of the broadcast.", |
| 399 | + "example": "Hello, world." |
| 400 | + }, |
| 401 | + "status": { |
| 402 | + "type": "string", |
| 403 | + "description": "The status of the broadcast.", |
| 404 | + "enum": [ |
| 405 | + "queued", |
| 406 | + "sent", |
| 407 | + "failed" |
| 408 | + ], |
| 409 | + "example": "sent" |
| 410 | + }, |
| 411 | + "created_on": { |
| 412 | + "type": "string", |
| 413 | + "description": "The date when the broadcast was created in the UTC time format: `YYYY-MM-DDT`.", |
| 414 | + "example": "2025-12-25T17:28:12.123456Z" |
396 | 415 | } |
397 | 416 | } |
398 | 417 | } |
|
419 | 438 | "tags": [ |
420 | 439 | "Broadcasts" |
421 | 440 | ], |
422 | | - "summary": "POST broadcasts", |
423 | | - "description": "List and send message broadcasts", |
424 | | - "operationId": "POSTBroadcasts", |
| 441 | + "summary": "Post Weni Flows broadcasts", |
| 442 | + "description": "Create and send new broadcasts.", |
| 443 | + "operationId": "PostBroadcasts", |
425 | 444 | "parameters": [ |
426 | 445 | { |
427 | 446 | "name": "Authorization", |
|
434 | 453 | } |
435 | 454 | } |
436 | 455 | ], |
| 456 | + "requestBody": { |
| 457 | + "required": true, |
| 458 | + "content": { |
| 459 | + "application/json": { |
| 460 | + "schema": { |
| 461 | + "type": "object", |
| 462 | + "properties": { |
| 463 | + "text": { |
| 464 | + "type": "string", |
| 465 | + "description": "The text of the broadcast. You can send a text of up to 640 characters per request.", |
| 466 | + "example": "Hello @contact.name" |
| 467 | + }, |
| 468 | + "urns": { |
| 469 | + "type": "array", |
| 470 | + "description": "List of URNs that will receive the broadcast. You can send up to 100 URNs per request.", |
| 471 | + "required": false, |
| 472 | + "items": { |
| 473 | + "type": "string", |
| 474 | + "description": "URNs of the recipient.", |
| 475 | + "example": [ |
| 476 | + "tel:+250788123123", |
| 477 | + "tel:+250788123124" |
| 478 | + ] |
| 479 | + } |
| 480 | + } |
| 481 | + } |
| 482 | + } |
| 483 | + } |
| 484 | + } |
| 485 | + }, |
437 | 486 | "responses": { |
438 | 487 | "200": { |
439 | 488 | "description": "OK", |
440 | 489 | "content": { |
441 | 490 | "application/json": { |
442 | 491 | "schema": { |
443 | | - "type": "object" |
| 492 | + "type": "object", |
| 493 | + "properties": { |
| 494 | + "next": { |
| 495 | + "$ref": "#/components/schemas/NextPage" |
| 496 | + }, |
| 497 | + "previous": { |
| 498 | + "$ref": "#/components/schemas/PreviousPage" |
| 499 | + }, |
| 500 | + } |
444 | 501 | } |
445 | 502 | } |
446 | 503 | } |
|
457 | 514 | "429": { |
458 | 515 | "description": "Rate limit exceeded - You have exceeded the rate limit for this endpoint" |
459 | 516 | } |
460 | | - }, |
461 | | - "requestBody": { |
462 | | - "required": true, |
463 | | - "content": { |
464 | | - "application/json": { |
465 | | - "schema": { |
466 | | - "type": "object" |
467 | | - } |
468 | | - } |
469 | | - } |
470 | 517 | } |
471 | 518 | } |
472 | 519 | }, |
|
0 commit comments