Xbee api mode 2 way communication

i have been searching all day long but cant seem to find if what i want to do is possible or not

i want to communicate with another xbee over uart to exchange some data then from that data i set digital pins on the other two xbees on or off, i already have the code for turning the digital pins high/low but cant seem to find uart comunication in api mode, any help would be appreciated thanks

#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);
int led = 13;

void setup() {  
pinMode(led, OUTPUT);
mySerial.begin(9600);
}

void loop() {
  
  digitalWrite(led,HIGH);
  byte xbeeLEDon[] = {0x7E, 0x00, 0x10, 0x17, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x02, 0x44, 0x33, 0x05, 0x6E};
  mySerial.write(xbeeLEDon, sizeof(xbeeLEDon));
  delay(6000);

  digitalWrite(led, LOW);
  byte xbeeLEDoff[] = {0x7E, 0x00, 0x10, 0x17, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFE, 0x02, 0x44, 0x33, 0x04, 0x6F};
  mySerial.write (xbeeLEDoff, sizeof(xbeeLEDoff));
  delay(6000);  

}