Get Announcements

Endpoint:

This endpoint retrieves announcement messages targeted at a specific group in your Xtracta account. These messages are used to notify users about important system updates, planned outages, improvements, or other platform-related information.

Use Cases

  • Display latest system announcements inside your application UI.
  • Fetch only announcements related to your specific group_id.
  • Log or alert high-priority announcements for internal teams.
  • Stay informed about Xtracta maintenance schedules or new features.

POST Parameters

ParameterRequiredValueDescription
api_key{key}Your API key
group_id{integer}The ID of the group for which to fetch announcements

Code Examples

The cURL, PHP, Python, Node.js, and C# examples call Xtracta from a trusted server. The React example calls an application-defined backend proxy so the API key is never exposed in browser code.

Warning

Store XTRACTA_API_KEY as a server-side environment variable. Never embed it in browser-delivered code.

curl --request POST 'https://api-app.xtracta.com/v1/announcement' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'api_key=<API_KEY>' \
  --data-urlencode 'group_id=<GROUP_ID>'

Sample Request

POST https://api-app.xtracta.com/v1/announcement HTTP/1.1
Content-Type: application/x-www-form-urlencoded

api_key=123
group_id=123

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
	<announcement_response>
		<status>200</status>
		<message>The request has been successfully processed</message>
		<announcement>
			<id>63</id>
			<type>default</type>
			<title>Test</title>
			<description><![CDATA[Testing <iframe width="640px" height="480px" src="https://www.youtube.com/watch?v=Je--mCfjByU" frameborder="0" marginwidth="0" marginheight="0" style="border: none; max-width:100%; max-height:100vh" allowfullscreen webkitallowfullscreen mozallowfullscreen msallowfullscreen></iframe>]]></description>
			<embedded_html/>
			<start_date>2025-07-29 13:44:00+12:00</start_date>
			<end_date>2025-08-14 13:44:00+12:00</end_date>
		</announcement>
		<announcement>
			<id>64</id>
			<type>default</type>
			<title>New Test</title>
			<description>Testing This is a test</description>
			<embedded_html>
				<![CDATA[<embed/>]]>
			</embedded_html>
			<start_date/>
			<end_date/>
		</announcement>
		<announcement>
			<id>65</id>
			<type>warning</type>
			<title>Another Test Accouncement</title>
			<description>Warning test announcement</description>
			<embedded_html/>
			<start_date>2025-07-31 21:40:00+12:00</start_date>
			<end_date>2025-08-07 22:41:00+12:00</end_date>
		</announcement>
	</announcement_response>

Schema Definition

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:simpleType name="ConfidenceType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:integer">
          <xs:minInclusive value="0"/>
          <xs:maxInclusive value="100"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value=""/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <xs:complexType name="AnnouncementresponseType">
    <xs:sequence>
      <xs:element name="status" type="xs:positiveInteger"/>
      <xs:element name="message" type="xs:string"/>
      <xs:element name="announcement" type="AnnouncementType" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AnnouncementType">
    <xs:sequence>
      <xs:element name="id" type="xs:positiveInteger" minOccurs="0"/>
      <xs:element name="type" type="xs:string" minOccurs="0"/>
      <xs:element name="title" type="xs:string" minOccurs="0"/>
      <xs:element name="description" type="xs:string" nillable="true" minOccurs="0"/>
      <xs:element name="embedded_html" type="xs:string" minOccurs="0"/>
      <xs:element name="start_date" type="xs:string" minOccurs="0"/>
      <xs:element name="end_date" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="announcement_response">
    <xs:complexType>
      <xs:sequence>
      <xs:element name="status" type="xs:positiveInteger"/>
      <xs:element name="message" type="xs:string"/>
      <xs:element name="announcement" type="AnnouncementType" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>

Error Responses

For JSON and XML responses generated by this endpoint, the response is wrapped in announcement_response and includes both the HTTP status code and a message.

StatusMessageDescription
400group_id must be natural numberUse a positive integer group_id.
500Internal server error occurred. Please try again later or contact support@xtracta.comRetry and contact support with the request parameters and timestamp if it persists.
Information Circle

Authentication, permission, IP-access-control, and rate-limit failures can be returned before this endpoint processes the request. Confirm the API key and caller access first.