# Update profile PUT https://hublinks.io/rest/accounts/{account_id}/campaigns/{campaign_id}/profiles/{profile_id} Content-Type: application/json Update a profile. **Request body fields (wrapped in `profile` object for CREATE; flat for UPDATE):** - `campaign_id` (string, required for create) - Parent campaign ID. - `seat_id` (string, required for create) - Seat performing outreach. - `member_id` (string, required) - Linkedin member ID. - `status` (string, optional) - `RUN` | `DONE` | `PAUSED`. - `first_name` / `last_name` (string, optional) - Profile name override. Reference: https://api.hublinks.io/api-reference/campaign-profiles/update-profile ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /rest/accounts/{account_id}/campaigns/{campaign_id}/profiles/{profile_id}: put: operationId: update-profile summary: Update profile description: >- Update a profile. **Request body fields (wrapped in `profile` object for CREATE; flat for UPDATE):** - `campaign_id` (string, required for create) - Parent campaign ID. - `seat_id` (string, required for create) - Seat performing outreach. - `member_id` (string, required) - Linkedin member ID. - `status` (string, optional) - `RUN` | `DONE` | `PAUSED`. - `first_name` / `last_name` (string, optional) - Profile name override. tags: - subpackage_campaignProfiles parameters: - name: account_id in: path required: true schema: type: string - name: campaign_id in: path required: true schema: type: string - name: profile_id in: path required: true schema: type: string - name: X-API-KEY in: header required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: >- #/components/schemas/Campaign Profiles_Update profile_Response_200 '400': description: Bad Request content: application/json: schema: $ref: >- #/components/schemas/PutRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesId_abcdefgRequestBadRequestError '401': description: Unauthorized content: application/json: schema: $ref: >- #/components/schemas/PutRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesId_abcdefgRequestUnauthorizedError requestBody: content: application/json: schema: type: object properties: status: type: string last_name: type: string required: - status - last_name servers: - url: https://hublinks.io components: schemas: RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfile: type: object properties: id: type: string status: type: string last_name: type: string account_id: type: string campaign_id: type: string required: - id - status - last_name - account_id - campaign_id title: >- RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfile RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfileOldActionLogsItems: type: object properties: 'n': type: string s: type: integer t: type: integer required: - 'n' - s - t title: >- RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfileOldActionLogsItems RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfileOld: type: object properties: campaign_id: type: string id: type: string status: type: string urn_lp: type: string seat_id: type: string comp_name: type: string filter_id: type: string full_name: type: string job_title: type: string last_name: type: string ln_degree: type: integer member_id: type: string public_id: type: string account_id: type: string first_name: type: string wait_until: type: integer action_logs: type: array items: $ref: >- #/components/schemas/RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfileOldActionLogsItems last_action: type: string ln_headline: type: string next_action: type: string comp_website: type: string next_node_id: type: string last_action_at: type: integer comp_industry_name: type: string comp_location_region: type: string ln_profile_message_at: type: integer ln_profile_replied_at: type: integer ln_profile_inmail_count: type: integer required: - campaign_id - id - status - urn_lp - seat_id - comp_name - filter_id - full_name - job_title - last_name - ln_degree - member_id - public_id - account_id - first_name - wait_until - action_logs - last_action - ln_headline - next_action - comp_website - next_node_id - last_action_at - comp_industry_name - comp_location_region - ln_profile_message_at - ln_profile_replied_at - ln_profile_inmail_count title: >- RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfileOld Campaign Profiles_Update profile_Response_200: type: object properties: success: type: boolean profile: $ref: >- #/components/schemas/RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfile profile_old: $ref: >- #/components/schemas/RestAccountsAccountIdCampaignsCampaignIdProfilesProfileIdPutResponsesContentApplicationJsonSchemaProfileOld updated_fields: type: array items: description: Any type required: - success - profile - profile_old - updated_fields title: Campaign Profiles_Update profile_Response_200 PutRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesId_abcdefgRequestBadRequestError: type: object properties: error: type: string message: type: string required: - error - message title: >- PutRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesId_abcdefgRequestBadRequestError PutRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesId_abcdefgRequestUnauthorizedError: type: object properties: error: type: string message: type: string required: - error - message title: >- PutRestAccountsAccount_cd855c2bb1cc72097238CampaignsCampaign_test_123ProfilesId_abcdefgRequestUnauthorizedError securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY ``` ## SDK Code Examples ```python Campaign Profiles_Update profile_example import requests url = "https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id" payload = { "status": "DONE", "last_name": "Hollander" } headers = { "X-API-KEY": "", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Campaign Profiles_Update profile_example const url = 'https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id'; const options = { method: 'PUT', headers: {'X-API-KEY': '', 'Content-Type': 'application/json'}, body: '{"status":"DONE","last_name":"Hollander"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Campaign Profiles_Update profile_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id" payload := strings.NewReader("{\n \"status\": \"DONE\",\n \"last_name\": \"Hollander\"\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("X-API-KEY", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Campaign Profiles_Update profile_example require 'uri' require 'net/http' url = URI("https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["X-API-KEY"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"status\": \"DONE\",\n \"last_name\": \"Hollander\"\n}" response = http.request(request) puts response.read_body ``` ```java Campaign Profiles_Update profile_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id") .header("X-API-KEY", "") .header("Content-Type", "application/json") .body("{\n \"status\": \"DONE\",\n \"last_name\": \"Hollander\"\n}") .asString(); ``` ```php Campaign Profiles_Update profile_example request('PUT', 'https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id', [ 'body' => '{ "status": "DONE", "last_name": "Hollander" }', 'headers' => [ 'Content-Type' => 'application/json', 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp Campaign Profiles_Update profile_example using RestSharp; var client = new RestClient("https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id"); var request = new RestRequest(Method.PUT); request.AddHeader("X-API-KEY", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"status\": \"DONE\",\n \"last_name\": \"Hollander\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Campaign Profiles_Update profile_example import Foundation let headers = [ "X-API-KEY": "", "Content-Type": "application/json" ] let parameters = [ "status": "DONE", "last_name": "Hollander" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://hublinks.io/rest/accounts/account_id/campaigns/campaign_id/profiles/profile_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```