Inviting a person to become your colleagueTo invite a person to become your colleague, send an Atom entry document containing the connection resource to the person's colleague connections feed.
To find a person's colleague connections feed, you can search for the person by name. From the returned feed, find the person and retrieve her associated user ID, and then use the user ID to retrieve the person's full feed, which includes a link to her colleague connections feed.
After you send the invitation, the connection is added to your connections in an unconfirmed state. The connection is added to the connections of the person you invited in a pending state. See Accept an invitation to become a colleague or Delete connections for information about how to accept or decline an invitation.
See Authenticating requests for information about how to authenticate the request.
Table 1. Atom API request details
Method Resource URI Input representation POST colleague connections feed Value of the href attribute of the <link> element with the rel="http://www.ibm.com/xmlns/prod/sn/connections/colleague" attribute value.
Note: You must include the connectionType=colleague parameter with this request.
InputProvide a connection Atom entry document.
Note: The content type of the Atom entry document must be application/atom+xml.
OutputAn Atom entry document containing the new connection.
Returned HTTP headers
HTTP/1.1 201 Created
Indicates that the invitation to connect was successfully created. If an error occurs, this header will contain one of the error codes below.
Link to edit_url of the connection entry. You can use the web address specified here to subsequently retrieve and update the connection.
- HTTP/1.1 400 Bad Request
- HTTP/1.1 401 Unauthorized
ExampleTo invite someone to become a colleague, you can send the following HTTP request:
POST /firstname.lastname@example.org&connectionType= colleague HTTP/1.1 Authorization: Basic xxxx Host: connections.example.com Accept: */* Content-type: application/atom+xml Content-Length: 645
<?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:snx="http://www.ibm.com/xmlns/prod/sn"> <category term="connection" scheme="http://www.ibm.com/xmlns/prod/sn/type" /> <category term="colleague" scheme="http://www.ibm.com/xmlns/prod/sn/connection/type" /> <category term="pending" scheme="http://www.ibm.com/xmlns/prod/sn/status" /> <!-- Message to other user --> <content type="html"> Please accept this invitation to be in my network of Connections colleagues. </content> </entry>
HTTP/1.1 201 Created Location: https://connections.example.com/profiles/atom/connection.do? connectionId=3af94660-0b59-40fc-ac63-167d111c208d
Parent topicWork with colleague connections
Colleague connection entry content