REST API: Organizations
An end-user can be a member of an organization.
Show
GET /organizations/#{id}.xml
Returns a single organization.
Response
Status: 200 OK
<organization>
<id>2</id>
<name>Support</name>
<is-shared>true</name>
<default>ajax-corp.com</default>
<users>
<user>
<created-at>2006-12-14T16:46:02Z</created-at>
<email>tommy@somewhere-strange.com</email>
<organization-id type="NilClass">2</organization-id>
<id>3</id>
<is-active>true</is-active>
<is-verified>true</is-verified>
<name>Tommy Lee Jones</name>
<roles>0</roles>
<time-format>0</time-format>
<time-zone>(GMT +01:00) Brussels, Copenhagen, Madrid, Paris</time-zone>
<updated-at>2007-06-16T14:15:09Z</updated-at>
</user>
...
</users>
</organization>
The returned XML includes end-users assigned to the organization.
List All
GET /organizations.xml
Response
Status: 200 OK
<organizations>
<organization>
...
</organization>
<organization>
...
</organization>
</organizations>
Create
POST /organizations.xml
Creates a new organization.
Request
<organization>
<name>Ajax Corp</name>
</organization>
Response
Status: 201 Created
Location: http://account.zendesk.com/organizations/#{new-organization-id}.xml
Adds a organization with one agent as member.
Update
PUT /organizations/#{id}.xml
Updates an existing organization with new details from the submitted XML.
Request
<organization>
<name>Ajax Mega Corp</name>
</organization>
Response
Status: 200 OK
Destroy
DELETE /organizations/#{id}.xml
Destroys the organization at the referenced URL.
Response
Status: 200 OK
