Invite

Fields

FieldNameDescriptionTypeRequired
section_id Section ID For course invites, the ID of the course section related to the invite integer
section_name Section Name For course invites, the display name of the course section related to the invite string
group_id Group ID For group invites, the ID of the group related to the invite string
group_name Group Name For group invites, the display name of the group related to the invite string
picture_url Picture URL The full URL of the profile picture of the related group or course section string
school_name School Name The name of the school that owns the realm related to the invite string
school_id School ID The ID of the school that owns the realm related to the invite string
created Date Created The unix timestamp when the request was created string yes

Operations

list

View a list of pending invites. You can specify the key 'created_offset' in the query string to view only invites that were created after the specified time. The expected format of the 'created_offset' key value is anything that PHP's strtotime function can interperet. For example:

 /users/[user_id]/invites/group?created_offset=2010-05-14+23:44:32


Path

GET https://api.schoology.com/v1/users/{user_id}/invites/{realm}

Content

none

Return

A collection of invite objects, each one containing invite fields

JSON
{
    "invite": [
        {
            "group_id": 49736,
            "group_name": "Chess Club",
            "picture_url": "http:\/\/...",
            "school_name": "Washington University",
            "school_id": 170,
            "id": 55232611,
            "created": 1389715233
        }
    ]
}
XML
<?xml version="1.0" encoding="utf-8" ?>
<result>
    <invite>
        <group_id>49736</group_id>
        <group_name>Chess Club</group_name>
        <picture_url>http:\/\/...</picture_url>
        <school_name>Washington University</school_name>
        <school_id>170</school_id>
        <id>55232611</id>
        <created>1389715233</created>
    </invite>
</result>

update

Update a pending invite. The invite action field value must be a string( accept | deny ). NOTE: Currently there is an issue with this API call that requires an additional tag for correct request body structure. See the example below for details.


<?xml version="1.0" encoding="utf-8" ?>
<request>
  <invite>
    <invite_action>deny</invite_action>
 </invite>
</request>


Path

PUT https://api.schoology.com/v1/users/{user_id}/invites/{realm}/{invite_id}

Content

An object containing a invite_action field

JSON
{
    "invite": {
        "invite_action": "deny"
    }
}
XML
<request>
  <invite>
    <invite_action>deny</invite_action>
  </invite>
</request>
Return

none