Is there a way to change caller id by dialing a different prefix. Or is there a api for 3cx where I can send a post request to change the cid for a user?
In each outbound rule, you can add a caller ID to override any other (as permitted by your provider). You would just have to create some new rules, with different prefixes, to send the caller ID in that rule. Place these above the original outbound rule.